.TH std::experimental::pmr::polymorphic_allocator 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::experimental::pmr::polymorphic_allocator \- std::experimental::pmr::polymorphic_allocator

.SH Synopsis
   Defined in header <experimental/memory_resource>
   template< class T >                               (library fundamentals TS)
   class polymorphic_allocator;

   The class template std::experimental::pmr::polymorphic_allocator is an Allocator
   whose allocation behavior depends on the memory resource it is constructed with.
   Thus, different instances of polymorphic_allocator can exhibit entirely different
   allocation behavior. This runtime polymorphism allows objects using
   polymorphic_allocator to behave as if they used different allocator types at run
   time despite the identical static allocator type.

.SH Member types

   Member type definition
   value_type  T

.SH Member functions

   constructor                           constructs a polymorphic_allocator
                                         \fI(public member function)\fP
   destructor                            implicitly declared destructor
   (implicitly declared)                 \fI(public member function)\fP
   operator=                             copy assignment operator
                                         \fI(public member function)\fP
.SH Public member functions
   allocate                              allocate memory
                                         \fI(public member function)\fP
   deallocate                            deallocate memory
                                         \fI(public member function)\fP
   construct                             constructs an object in allocated storage
                                         \fI(public member function)\fP
   destroy                               destroys an object in allocated storage
                                         \fI(public member function)\fP
                                         create a new polymorphic_allocator for use by
   select_on_container_copy_construction a container's copy constructor
                                         \fI(public member function)\fP
                                         returns a pointer to the underlying memory
   resource                              resource
                                         \fI(public member function)\fP

.SH Non-member functions

   operator== compare two polymorphic_allocators
   operator!= \fI(function)\fP

.SH Category:
     * Noindexed pages
